package cn.wolfcode.crm.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;
/*
* 车险投保之后保存到这个暂存单当中
* */
@Setter
@Getter
public class GuaranteeBill {

    //暂存单
    public final static Integer TEMPORARY_STORAGE_INSURANCE= 1;
    //退回单
    public final static Integer CORRECT_INSURANCE= 2;
    //待审核
    public final static Integer UNAUDITED= 3;
    //已审核
    public final static Integer AUDITED= 4;
    //已缴费
    public final  static  Integer ALREADYPAY = 5;
    //拒保状态
    public final  static  Integer REFUSE = 6;

    private Long id;

    //保险单号
    private String number;

    //投保人
    private Client policyClient;

    //3.申请日期
    @JsonFormat(pattern = "yyyy-MM-dd", timezone="GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date vdate;

    //保单负责的业务员
    private Employee opEmployee;

    //保险的总价格
    private BigDecimal totalPrice;

    //车辆信息
    private Car car;

    //设置当前保单的状态,默认为暂存单状态
    private Integer state=TEMPORARY_STORAGE_INSURANCE;

    //审核人
    private Employee auditor;

    //保险的时长
    private Integer limitYear;

    //批改信息
    private String info;

    //审核日期
    @JsonFormat(pattern = "yyyy-MM-dd", timezone="GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date auditDate;

    //12.起始日期
    @JsonFormat(pattern = "yyyy-MM-dd", timezone="GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
        private Date beginDate;

    //13.终止日期
    @JsonFormat(pattern = "yyyy-MM-dd", timezone="GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date endDate;


}